#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int main()
{
	int arr[10] = { 0 };
	int h=0,num=0;
	for (int i = 0;i < 10;i++) scanf("%d", &arr[i]);
	scanf("%d", &h);
	for (int i = 0;i < 10;i++) {
		if (h + 30 >= arr[i]) num++;
	}
	printf("%d\n", num);
	return 0;
}